3.823 \(\int (-a-b x)^{-n} (a+b x)^n \, dx\)

Optimal. Leaf size=21 \[ x (-a-b x)^{-n} (a+b x)^n \]

[Out]

(x*(a + b*x)^n)/(-a - b*x)^n

________________________________________________________________________________________

Rubi [A]  time = 0.0026255, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {23, 8} \[ x (-a-b x)^{-n} (a+b x)^n \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^n/(-a - b*x)^n,x]

[Out]

(x*(a + b*x)^n)/(-a - b*x)^n

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int (-a-b x)^{-n} (a+b x)^n \, dx &=\left ((-a-b x)^{-n} (a+b x)^n\right ) \int 1 \, dx\\ &=x (-a-b x)^{-n} (a+b x)^n\\ \end{align*}

Mathematica [A]  time = 0.0018964, size = 21, normalized size = 1. \[ x (-a-b x)^{-n} (a+b x)^n \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^n/(-a - b*x)^n,x]

[Out]

(x*(a + b*x)^n)/(-a - b*x)^n

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 26, normalized size = 1.2 \begin{align*}{\frac{x{{\rm e}^{n\ln \left ( bx+a \right ) }}}{{{\rm e}^{n\ln \left ( -bx-a \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n/((-b*x-a)^n),x)

[Out]

x*exp(n*ln(b*x+a))/exp(n*ln(-b*x-a))

________________________________________________________________________________________

Maxima [A]  time = 1.3917, size = 7, normalized size = 0.33 \begin{align*} \left (-1\right )^{n} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/((-b*x-a)^n),x, algorithm="maxima")

[Out]

(-1)^n*x

________________________________________________________________________________________

Fricas [A]  time = 1.71775, size = 18, normalized size = 0.86 \begin{align*} x \cos \left (\pi n\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/((-b*x-a)^n),x, algorithm="fricas")

[Out]

x*cos(pi*n)

________________________________________________________________________________________

Sympy [A]  time = 7.60881, size = 15, normalized size = 0.71 \begin{align*} x \left (- a - b x\right )^{- n} \left (a + b x\right )^{n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n/((-b*x-a)**n),x)

[Out]

x*(-a - b*x)**(-n)*(a + b*x)**n

________________________________________________________________________________________

Giac [A]  time = 3.27721, size = 1, normalized size = 0.05 \begin{align*} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/((-b*x-a)^n),x, algorithm="giac")

[Out]

x